//
//  LeadToLoginInViewController.m
//  WisdomZhuHai
//
//  Created by JasonLee on 15/1/13.
//  Copyright (c) 2015年 wyd. All rights reserved.
//

#import "LeadToLoginInViewController.h"
#import "LoginViewController.h"
#import "TransforController.h"

@interface LeadToLoginInViewController ()

@end

@implementation LeadToLoginInViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    float target = (((self.view.bounds.size.height / 100) + 1) - (self.view.bounds.size.height / 100));
    UIImageView *img_leading = [[UIImageView alloc] initWithFrame:CGRectMake(HEIGHT_STATUS_BAR * target - (target * HEIGHT_STATUS_BAR / 10), 20, self.view.bounds.size.width - (HEIGHT_STATUS_BAR * (target + 1)), self.view.bounds.size.height - HEIGHT_BOTTOM_BAR)];
//    NSLog(@"%s || width:%f, height:%f", __FUNCTION__, img_leading.frame.size.width , img_leading.frame.size.height);
    [img_leading setImage:[UIImage imageNamed:@"立即加入.png"]];
    UIButton *btn_leading = [[UIButton alloc]initWithFrame:CGRectMake(70, (img_leading.frame.size.height / 2) - 25, 180, 100)];
//    NSLog(@"%s || btn_leading's frame size:%f, %f", __FUNCTION__, btn_leading.frame.size.width, btn_leading.frame.size.height);
//    btn_leading.backgroundColor = [UIColor redColor];
    [btn_leading addTarget:self action:@selector(gotoLoginView) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:img_leading];
    [self.view addSubview:btn_leading];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

- (void)gotoLoginView{
    LoginViewController *ctrl_loginView = [[LoginViewController alloc]initWithNibName:@"LoginViewController" bundle:nil];
    ctrl_loginView.delegate = self.delegate;
    ctrl_loginView.hidesBottomBarWhenPushed = YES;
    [self.navigationCtrl pushViewController:ctrl_loginView animated:YES];
}



@end
